package exam.dao;

import org.apache.ibatis.annotations.Param;
import org.example.domain.Teacher;
import org.example.domain.Template;

import java.util.List;
import java.util.Map;

public interface TemplateDao {
    void templateSave(Template template);
    List<Template> selectTemplateList(Map<String,Object> map);

    /**
     * 这个是找到谁分享给当前老师模板的那些老师
     * @param id
     * @return
     */
    List<Teacher> selectShareTeacher(Long id);
    Teacher selectTeacherByTemplateId(Long templateId);

    /**
     * 这个是找到模板分享给了那些老师
     * @param templateId
     * @return
     */
    List<Teacher> selectShareToTeacher(Long templateId);
    Template selectTemplateById(Long id);
    int selectTemplateShareStatusById(Long id);
    void deleteOneList(Long id);
    int updateTemplateStatusById(Map<String,Object> map);
    void setShareStatus(@Param("id") Long id,@Param("teacherId") Long teacherId);
    void editSave(Template template);
    void updateTemplateRelationQuestionStatus(@Param("questionIds") List<Long> questionIds,@Param("status")String status);
}
